avl tree balance factor calculation